<?php $this->extend('template');?>

<?php $this->start('titre_page'); ?>
	<?php echo __('View Continent'); ?>
<?php $this->end(); ?>

<?php $this->start('titre'); ?>
	<h1><?php echo __('View Continent'); ?></h1>
<?php $this->end(); ?>

<div class="continents view">
	<h2>
		<?php echo h($continent['Continent']['name']); ?>
		&nbsp;
	</h2>

		<?php echo __('Number visits').': '; ?>
			<?php echo h($continent['Continent']['nb_visits']); ?>
			&nbsp;



	</dl>
</div>

<div class="related">
	<h3><?php echo __('Related Countries'); ?></h3>
	<?php if (!empty($continent['Country'])): ?>

	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Name'); ?></th>
		<th><?php echo __('Currency'); ?></th>
		<th><?php echo __('Photo Path'); ?></th>
		<th><?php echo __('Flag Path'); ?></th>
		<th><?php echo __('Center Latitude'); ?></th>
		<th><?php echo __('Center Longitude'); ?></th>
		<th><?php echo __('Nb Visits'); ?></th>
		<th><?php echo __('Type Region'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($continent['Country'] as $country): ?>
		
		<tr>
			<td><?php echo $country['name']; ?></td>
			<td><?php echo $country['Currency']['name_short']; ?></td>
			<td><?php echo $country['photo_path']; ?></td>
			<td><?php echo $country['flag_path']; ?></td>
			<td><?php echo $country['center_latitude']; ?></td>
			<td><?php echo $country['center_longitude']; ?></td>
			<td><?php echo $country['nb_visits']; ?></td>
			<td><?php echo $country['TypesRegion']['name']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'countries', 'action' => 'view', $country['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'countries', 'action' => 'edit', $country['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'countries', 'action' => 'delete', $country['id']), null, __('Are you sure you want to delete # %s?', $country['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Country'), array('controller' => 'countries', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
